/**
 * 这里写用户模块的网络请求
 */

import axiosServer from "@/utils/request";

export const requestlogin = (username, password) => {
  return axiosServer({
    method: "post",
    url: "/api/member/login",
    data: {
      username,
      password,
    },
  });
};

// 会员注册接口
export const requestregistr = (username, password, headerimg, nick) => {
  return axiosServer({
    method: "post",
    url: "/api/member/add",
    data: {
      username,
      password,
      headerimg,
      nick,

    },
  });
};
/**
 * 上传头像
 */
export const RequestUploadFile = (formData) => {
  return axiosServer({
    method: 'post',
    url: '/api/uploadFile',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data: formData
  })
}
